public class Solution812 {
    public double largestTriangleArea(int[][] points) {
        double ans=0;
        for (int i=0;i<points.length;i++){
            for (int j=i+1;j<points.length;j++){
                for (int k=j+1;k<points.length;k++){
                    ans=Math.max(ans,cal(dis(points[i],points[j]),dis(points[i],points[k]),dis(points[j],points[k])));
                }
            }
        }
        return ans;
    }

    private double cal(double a, double b, double c) {
        double p=(a+b+c)/2;
        double v = p * (p - a) * (p - b) * (p - c);
        return v >0?Math.sqrt(v):0;
    }

    private double dis(int[] point1, int[] point2) {
        return Math.sqrt((point1[0]-point2[0])*(point1[0]-point2[0])+(point1[1]-point2[1])*(point1[1]-point2[1]));
    }

    public static void main(String[] args) {
        System.out.println(new Solution812().largestTriangleArea(new int[][]{{0,0},{0,1},{1,0},{0,2},{2,0}}));
    }
}
